# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=liblouis
pkgver=3.7.0
pkgrel=1
pkgdesc="Open-source braille translator and back-translator"
arch=(x86_64)
url="http://liblouis.org/"
license=('GPL3')
depends=(glibc)
makedepends=(help2man python2 python)
source=(https://github.com/liblouis/liblouis/releases/download/v$pkgver/liblouis-$pkgver.tar.gz)
sha256sums=('842a86091d78979cd8d1705936de1735b8ff6b9c961781d292fa9783f3f6335c')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --disable-static --enable-ucs4
  make -j1
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

  cd python
  LD_PRELOAD+=":$srcdir/$pkgname-$pkgver/liblouis/.libs/liblouis.so"
  python2 setup.py install --root="$pkgdir" --prefix="/usr" --optimize=1
  python setup.py install --root="$pkgdir" --prefix="/usr" --optimize=1
}
# vim:set ts=2 sw=2 et:
